package com.smart.upms.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smart.upms.sys.entity.SysUser;
import com.smart.upms.sys.param.SysUserQueryParam;
import com.smart.upms.sys.result.SysUserAndRoleResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 系统用户 Mapper 接口
 * </p>
 *
 * @author guxiaobai
 * @since 2018-12-05
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 获取用户信息和权限信息
     *
     * @param id
     * @return
     */
    SysUserAndRoleResult getUserAndRole(Long id);

    /**
     * 分页查询用户
     *
     * @param page
     * @param param
     * @return
     */
    List<SysUserAndRoleResult> listPage(Page<SysUserAndRoleResult> page, @Param("param") SysUserQueryParam param);
}
